from tpuSk import *
import os

tpu = tpuSk()

ok = tpu.generate_usb_config_ini("./usbprop.ini")

if ok == 0:
    print("OK", ok)

PWD = os.getcwd()
#
os.environ['USB_CONFIG_INI'] = os.path.join(PWD, 'usbprop.ini')
tpu.init()
##
#app_name = 'calculate'
#srcPath = f"/root/data/model/{app_name}/model.bin"
#dstPath = "./model.bin"
#srcPath = f"/root/data/model/{app_name}/model.conf"
#dstPath = "./model.conf"
##
#tpu.get_file(srcPath, dstPath)
#str = tpu.get_model_config()

#print(str)

tpu.send_cmd("reboot")
